#if _MSC_VER
 #pragma once
#endif // _MSC_VER

#ifndef __HERZELEID_IRENDERER_INCLUDED__
 #define __HERZELEID_IRENDERER_INCLUDED__
 #include "HerzeleidRendererModelCore.hxx"

 #ifdef HERZELEID_DESKTOP // Desktop
  #define internal public // For compability
  #define ref // For compability
 #else // Metro Or Phone
 #endif // HERZELEID_DESKTOP

HerzeleidRendererCoreNamespaceBegin template<class TDevice, class TContext> ref struct IRenderer
{
	TinyTypeDecl(TContext); // Renderer context
	TinyTypeDecl(TDevice); // Renderer device

#ifdef HERZELEID_DESKTOP // Desktop
protected:
#else // Metro Or Phone
protected private:
#endif // HERZELEID_DESKTOP
	TDevicePtr m_Device; // Renderer device pointer
	TContextPtr m_ImmediateContext; // Renderer context pointer 

internal:

	IRenderer() : m_Device(nullptr), m_ImmediateContext(nullptr) { }

 #ifdef HERZELEID_DESKTOP // Desktop
	DeclGetPropOnly( TDevicePtr, Device ); // Gets the renderer device 
	DeclGetPropOnly( TContextPtr, ImmediateContext ); // Gets the renderer immediate context 
	DeclTypedGetterFor( TDevicePtrConst, Device ) { return m_Device; } // Gets the renderer device 
	DeclConstTypedGetterFor( TDevicePtrConst, Device ) { return m_Device; } // Gets the renderer device 
	DeclTypedGetterFor( TContextPtrConst, ImmediateContext ) { return m_ImmediateContext; } // Gets the renderer immediate context 
	DeclConstTypedGetterFor( TContextPtrConst, ImmediateContext ) { return m_ImmediateContext; } // Gets the renderer immediate context 
 #else // Metro Or Phone
	property TDevicePtr Device { TDevicePtr get() { return m_Device; } }
	property TContextPtr ImmediateContext { TContextPtr get() { return m_ImmediateContext; } }
 #endif // HERZELEID_DESKTOP

} HerzeleidRendererCoreNamespaceEnd;

 #ifdef HERZELEID_DESKTOP
  #undef internal
  #undef ref
 #else
 #endif // HERZELEID_DESKTOP

#endif // !HERZELEID_IRENDERER_INCLUDED__
